import { type World } from "../world/World";
import { EntityType } from "../enums/EntityType";
import { IUpdatable } from "./IUpdatable";
import { IInputReceiver } from "./IInputReceiver";

export interface IWorldEntity extends IUpdatable {

    entityType: EntityType;

    addToWorld ( world: World ): void;

    removeFromWorld (): void;

}

export interface ICharacterEntity extends IWorldEntity {

    handleKeyboardEvent ( event: KeyboardEvent, code: string, pressed: boolean ): void;
    handleMouseButton ( event: MouseEvent, code: string, pressed: boolean ): void;
    handleMouseMove ( event: MouseEvent, deltaX: number, deltaY: number ): void;
    handleMouseWheel ( event: WheelEvent, value: number ): void;

    inputReceiverInit (): void;
    inputReceiverUpdate ( timeStep: number ): void;

}